package org.ztr.yanai.blog.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.ztr.yanai.blog.enums.PostStatusEnum;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/22 14:30
 * @Description: 创建文章请求DTO
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "创建文章请求")
public class CreatePostDTO {

    @Schema(description = "文章标题", example = "Spring Boot最佳实践")
    @NotBlank(message = "文章标题不能为空")
    @Size(min = 1, max = 200, message = "标题长度必须在1-200之间")
    private String title;

    @Schema(description = "文章内容")
    @NotBlank(message = "文章内容不能为空")
    private String content;

    @Schema(description = "文章状态", example = "PUBLISHED")
    @NotNull(message = "文章状态不能为空")
    private PostStatusEnum status;
}
